/*let lb = {name: "刘备", age: 36, sex: "男", country: "蜀国", otherName: "玄德"};
let gy = {name: "刘备", age: 36, sex: "男", country: "蜀国", otherName: "玄德"};
let zf = {name: "刘备", age: 36, sex: "男", country: "蜀国", otherName: "玄德"};
let zy = {name: "刘备", age: 36, sex: "男", country: "蜀国", otherName: "玄德"};
let mc = {name: "刘备", age: 36, sex: "男", country: "蜀国", otherName: "玄德"};
let zhg = {name: "刘备", age: 36, sex: "男", country: "蜀国", otherName: "玄德"};
let hz = {name: "刘备", age: 36, sex: "男", country: "蜀国", otherName: "玄德"};
let sq = {name: "刘备", age: 36, sex: "男", country: "蜀国", otherName: "玄德"};
let zhouYu = {name: "刘备", age: 36, sex: "男", country: "蜀国", otherName: "玄德"};
let sunCe = {name: "刘备", age: 36, sex: "男", country: "蜀国", otherName: "玄德"};
let luSu = {name: "刘备", age: 36, sex: "男", country: "蜀国", otherName: "玄德"};*/

// 构造函数

// function People(n, a, s, c, o) {
//     this.name = n;
//     this.age = a;
//     this.sex = s;
//     this.country = c;
//     this.other = o;
// }
class People {
    // name;
    // age;
    // sex;
    // country;
    // other;
    constructor(n, a, s, c, o) {
        this.name = n;
        this.age = a;
        this.sex = s;
        this.country = c;
        this.other = o;
    }

    sayHi() {
        console.log(`我叫${this.name},aka五虎将`)
    }
}
//this指当前对象的引用
let lb = new People("刘备", 36, "男", "蜀国", "玄德");
let gy = new People("关于", 35, "男", "蜀国", "云长");
console.log(lb)
console.log(gy)
lb.sayHi()
gy.sayHi()